using System;
using System.Collections.Generic;
using System.Text;

namespace BuildingBasicDomain
{
    public class Elipse :Circle  
    {
        private double  radius2;

        public Elipse(double radius , double radius2 ):base   (radius  )
        {
            this.radius2 = radius2;
        }

        public double Radius2
        {
            get
            {
                return radius2;
            }
            set
            {
                radius2 = value;
            }
        }
        
        public override System.Collections.Generic.IEnumerable<BuildingBasicDomain.IPoint> perimeter(int numOfPoints)
        {
            IPoint point;
            for (int i = 0;i < numOfPoints ;i++ )
            {
                double th = i * 2 * Math.PI / numOfPoints;
                point = new Point(Radius * Math.Sin(th), Radius2 * Math.Cos(th),0);
                yield return point;
            }

        }
    }
}
